package com.neusoft.neu24.myaspect.aops;


import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Service;


@Service
@Aspect
public class QieMian {

    @Pointcut("execution(*   com.neusoft.neu24.myaspect.service.*.*(..)  )")
    private void allMethods(){}

    @Before("allMethods()")
    public void qianZhiTongzhi(){
        System.out.println("前置通知");
// 前置通知执行后，不再继续执行的方法是抛出异常
        int  i =1;
        int j = 0 ;
        i =  i / j ;


    }




}
